import zhCN from "element-plus/dist/locale/zh-cn.mjs"; //引入中文
import {createApp} from 'vue';
import ElementPlus from 'element-plus';
import './assets/main.css';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import {createPinia} from 'pinia';
import App from './App.vue';
import router from './router';
import 'element-plus/dist/index.css';
import {printClick} from './globalMethods.ts'; // 引入全局方法
import './assets/css/global.css' // 引入全局样式
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(createPinia())
app.use(router)
app.use(ElementPlus, {locale: zhCN})

// 入库单单据状态
app.provide('inboundNoList', [
    {value: 'PENDING_APPROVAL', label: '待处理'},
    {value: 'APPROVED', label: '已完成'},
    {value: 'APPROVAL_NOT_PASSED', label: '已取消'},
])

// 出入库任务状态
app.provide('inboundStatusList', [
    {value: 'PENDING_PROCESSING', label: '待处理'},
    {value: 'REJECT', label: '驳回'},
    {value: 'COMPLETED', label: '完成'},
])


// 入库单业务类型
app.provide('businessTypeList', [
    {
        label: '采购入库',
        value: 1
    }, {
        label: '销售退库',
        value: 2
    }, {
        label: '生产退库',
        value: 3
    }, {
        label: '生产入库',
        value: 4
    }, {
        label: '调拨（入）',
        value: 5
    }, {
        label: '委外入库',
        value: 6
    }, {
        label: '线边备料（入）',
        value: 7
    }
])

// 出库业务类型
app.provide('businessOutTypeList', [
    {
        label: '销售出库',
        value: 1
    },
    {
        label: '调拨（出）',
        value: 2
    },
    {
        label: '委外出库',
        value: 3
    },
    {
        label: '线边备料（出）',
        value: 4
    },
    {
        label: '生产出库',
        value: 5
    },
    {
        label: '生产退库（出）',
        value: 6
    },
    {
        label: '退供应商',
        value: 7
    }
    ])

// 物料类型
app.provide('materialProperData', [
    {label: '毛坯', value: '0'},
    {label: '加工中', value: '1'},
    {label: '半成品', value: '2'},
    {label: '成品', value: '3'},
    {label: '废品', value: '4'}
])


app.config.globalProperties.$printClick = printClick; // 注册为全局方法

app.mount('#app')
